<!DOCTYPE html>
<html lang="zh-CN" xmlns:wb="http://open.weibo.com/wb">
<head>
  <include file="./Public/Tpl/head.html" title="中英互译" description="自动识别用户输入语言,将其翻译成另外一种语言,如:英语->汉语;汉语->英语" keywords="翻译,API,中英互译,Fantwo"/>
</head>
<body>
<include file="./Public/Tpl/nav.html"/>
<div class="container">
  <h3>中英互译API</h3>
  <div class="row">
    <div class="col-md-5">
      <form method="get" action="">
        <div class="form-group">
          <label for="tword">目标原文:</label>
          <input name="word" id="tword" class="form-control" type="text" placeholder="单词,语句"/><br>
        </div>
        <button type="submit" class="btn btn-default">提交</button>
      </form>
    </div>
    <div class="col-md-offset-0 col-md-2"></div>
    <div class="col-md-5">
      <div class="panel panel-default">
        <div class="panel-heading">翻译结果:</div>
        <div class="panel-body">
          {$result}
        </div>
      </div>
    </div>
  </div>
  <hr>
  <div class="row">
    <div class="panel panel-default">
      <div class="panel-heading">
        <h3 class="panel-title">功能介绍</h3>
      </div>
      <div class="panel-body">
        <ol>
          <li>提交中文,返回对应的英文文本</li>
          <li>提交英文,返回对应的中文文本</li>
          <li>API调用方式:<span>
            <php>echo "http://".I('server.SERVER_NAME').explode('?',I('server.REQUEST_URI'))[0];</php>?qq=你的QQ号&word=翻译内容</span>
            <small>(数据格式见调用结果)</small>
          </li>
        </ol>
      </div>
    </div>
  </div>
</div>
<include file="./Public/Tpl/footer.html"/>
</body>
</html>